

#include "fig_ui_tutorial.h"
#include "gen_game_state.h"


#include "ui/ui_checkbox.h"
#include "ui/ui_manager.h"
#include "gameflow/game_flow_manager.h"
#include "gameflow/ui_popup.h"
#include "gameflow/ui_state.h"
#include "font/font_manager.h"
#include "graphics/graphics.h"
#include "graphics/graphics_util.h"
#include "application/game_application.h"

#include "util/log.h"
#include "util/profiler.h"

using namespace gameflow;



FIGUITutorial::FIGUITutorial(camera::FbCamera*	pCamera) :
		gameflow::UIState(pCamera, "ui/tutorial_menu.ui")		

{
   
	
	SetWidgetFunctor("easy_button",UI_DELEGATE(FIGUITutorial, OnButtonBack));
	SetWidgetFunctor("normal_button",UI_DELEGATE(FIGUITutorial, OnButtonNext));
	SetWidgetFunctor("hard_button",UI_DELEGATE(FIGUITutorial, OnButtonSkip));

	
	
}


bool		FIGUITutorial::Tick(float dt)
{
	return false;
}


void DELEGATE_CALL	FIGUITutorial::OnButtonBack(ui::UIWidget::WIDGET_EVENT Event, ui::UIWidget* pWidget)
{
	
	gameflow::GameFlowManager&	Game = gameflow::GameFlowManager::Instance();
	Game.TransitionToState("main_menu");

}

void DELEGATE_CALL	FIGUITutorial::OnButtonNext(ui::UIWidget::WIDGET_EVENT Event, ui::UIWidget* pWidget)
{
	
	gameflow::GameFlowManager&	Game = gameflow::GameFlowManager::Instance();
	Game.TransitionToState("main_menu");

}

void DELEGATE_CALL	FIGUITutorial::OnButtonSkip(ui::UIWidget::WIDGET_EVENT Event, ui::UIWidget* pWidget)
{
	
	gameflow::GameFlowManager&	Game = gameflow::GameFlowManager::Instance();
	Game.TransitionToState("main_menu");

}

